﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Microsoft.WowAddonStudio.FrameXml.Serialization
{
    [Serializable]
    [DesignerCategory("code")]
    [XmlType(Namespace = "http://www.blizzard.com/wow/ui/")]
    public class Scripts : SerializationObject
    {
        [XmlElement("OnAnimFinished", typeof(string))]
        [XmlElement("OnAttributeChanged", typeof(string))]
        [XmlElement("OnChar", typeof(string))]
        [XmlElement("OnCharComposition", typeof(string))]
        [XmlElement("OnClick", typeof(string))]
        [XmlElement("OnColorSelect", typeof(string))]
        [XmlElement("OnCursorChanged", typeof(string))]
        [XmlElement("OnDoubleClick", typeof(string))]
        [XmlElement("OnDragStart", typeof(string))]
        [XmlElement("OnDragStop", typeof(string))]
        [XmlElement("OnEditFocusGained", typeof(string))]
        [XmlElement("OnEditFocusLost", typeof(string))]
        [XmlElement("OnEnter", typeof(string))]
        [XmlElement("OnEnterPressed", typeof(string))]
        [XmlElement("OnEscapePressed", typeof(string))]
        [XmlElement("OnEvent", typeof(string))]
        [XmlElement("OnHide", typeof(string))]
        [XmlElement("OnHorizontalScroll", typeof(string))]
        [XmlElement("OnHyperlinkClick", typeof(string))]
        [XmlElement("OnHyperlinkEnter", typeof(string))]
        [XmlElement("OnHyperlinkLeave", typeof(string))]
        [XmlElement("OnInputLanguageChanged", typeof(string))]
        [XmlElement("OnKeyDown", typeof(string))]
        [XmlElement("OnKeyUp", typeof(string))]
        [XmlElement("OnLeave", typeof(string))]
        [XmlElement("OnLoad", typeof(string))]
        [XmlElement("OnMessageScrollChanged", typeof(string))]
        [XmlElement("OnMouseDown", typeof(string))]
        [XmlElement("OnMouseUp", typeof(string))]
        [XmlElement("OnMouseWheel", typeof(string))]
        [XmlElement("OnMovieFinished", typeof(string))]
        [XmlElement("OnMovieHideSubtitle", typeof(string))]
        [XmlElement("OnMovieShowSubtitle", typeof(string))]
        [XmlElement("OnReceiveDrag", typeof(string))]
        [XmlElement("OnScrollRangeChanged", typeof(string))]
        [XmlElement("OnShow", typeof(string))]
        [XmlElement("OnSizeChanged", typeof(string))]
        [XmlElement("OnSpacePressed", typeof(string))]
        [XmlElement("OnTabPressed", typeof(string))]
        [XmlElement("OnTextChanged", typeof(string))]
        [XmlElement("OnTextSet", typeof(string))]
        [XmlElement("OnTooltipAddMoney", typeof(string))]
        [XmlElement("OnTooltipCleared", typeof(string))]
        [XmlElement("OnTooltipSetDefaultAnchor", typeof(string))]
        [XmlElement("OnTooltipSetItem", typeof(string))]
        [XmlElement("OnTooltipSetSpell", typeof(string))]
        [XmlElement("OnTooltipSetUnit", typeof(string))]
        [XmlElement("OnUpdate", typeof(string))]
        [XmlElement("OnUpdateModel", typeof(string))]
        [XmlElement("OnValueChanged", typeof(string))]
        [XmlElement("OnVerticalScroll", typeof(string))]
        [XmlElement("PostClick", typeof(string))]
        [XmlElement("PreClick", typeof(string))]
        [XmlChoiceIdentifier(MemberName = "EventNames")]
        public string[] ScriptValues { get; set; }

        [XmlIgnore]
        public EventName[] EventNames { get; set; }
    }
}